﻿using Cysharp.Threading.Tasks;
using Internal.KuiHuaBaoDian.Services.Guide;
using UnityEngine;

namespace KuiHuaBaoDian.Services.Guide {

    [NodeTitle("新手引导节选失败")]
    public sealed class GuideCommand_SetSectionFailure : GuideCommand {

        [SerializeField, Label("节选ID")]
        private int m_SectionID;
        public int SectionID => m_SectionID;

        protected override void Dispose() {
        }

        protected override UniTask Execute() {
            var section = GuideService.Instance.GetSectionByID(m_SectionID);
            if (section is IGuideSectionInternal @internal) {
                @internal.Failure();
            }
            return UniTask.CompletedTask;
        }
    }
}
